function RPController($scope, $routeParams, $http, Project, $resource, $rootScope){
	$scope.name = "RPController";
	$scope.params = $routeParams;
	//$scope.phones = Project.get();
	//$scope.key  = '6348256714038520009a57d1d2-5188-457b-854b-86aafea65fc5';
    $scope.key = $scope.auth;
var jo = $scope.auth;
    $scope.phones = Project.get({Creden:jo});
    $scope.otroEdit = false;

    $scope.ListCampaignsByAuth = function (authkey){
       	$scope.key  = authkey;
        $scope.phones = Project.get({Creden:authkey});
        $rootScope.data = $scope.phones;
    }
    $scope.SelectItem = function(item){
        var go = JSON.stringify(item);
        var gs = go.split(',');
        var msg = '';
        for(i = 0; i < gs.length; i++)
        {
            msg = msg + '\n [' +(gs[i].split('"')[1]) + '] : '  + gs[i].split('"')[3];
            if(gs[i].split('"')[4] != undefined)
            {msg  = msg +  gs[i].split('"')[4]; }
        }
        alert(msg);

    }
    
     $scope.editAuth = function(){
        $scope.otroEdit=true;
    };
    
    $scope.doneEditing = function () {
        $scope.otroEdit = false;
    };
};
